Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support fp stats #161

Merged
merged 20 commits into from
Dec 4, 2024
Merged

feat: support fp stats #161

merged 20 commits into from
Dec 4, 2024

Conversation

gusin13
Copy link
Contributor

@gusin13 gusin13 commented Nov 30, 2024

This pr

  1. deletes v1 queue client related code
  2. deletes all old tests
  3. cleans up queues (earlier multiple q's were uses, now only 2 are needed active/unbonding)
  4. injects stats in v2/finality-providers endpoint
  5. adds more information in v2/overall-stats endpoint
  6. cleans up message handlers (only active/unbonding required)

Note:
re - active_finality_providers and total_finality_providers in v2/overall-stats
for now i am querying directly the finality_provider_details indexer db to get this data but ideally this should come from indexer->queues->api->stats db

@gusin13 gusin13 force-pushed the gusin13/add-fp-stats branch from 06a8f27 to d5cc704 Compare November 30, 2024 07:45
@gusin13 gusin13 marked this pull request as ready for review December 1, 2024 17:23
@@ -34,12 +35,35 @@ func (s *V2Service) GetOverallStats(ctx context.Context) (*OverallStatsPublic, *
return nil, types.NewInternalServiceError(err)
}

activeStakersCount, err := s.DbClients.V2DBClient.GetActiveStakersCount(ctx)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will have performance issue when we have very big data set tho.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, added a todo for now and logged ticket
#165

Copy link
Collaborator

@jrwbabylonlab jrwbabylonlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some comments

@gusin13 gusin13 force-pushed the gusin13/add-fp-stats branch from def89be to 6d749e8 Compare December 3, 2024 05:58
@gusin13 gusin13 force-pushed the gusin13/add-fp-stats branch from db6c0a4 to 699a37b Compare December 4, 2024 12:37
@gusin13 gusin13 merged commit b4c9b7d into main Dec 4, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants